package kr.co.exight.onApp;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.Window;
import android.view.WindowManager;

abstract class ParentDialog extends Activity{
	public Activity activity;
	protected MyDialog dialog;
	
	public Dialog getDialog(){
		return dialog;
	}
	
	public ParentDialog(Activity activity){
		this.activity = activity;
		
		dialog = new MyDialog(activity);
		Window window = dialog.getWindow();


		window.setFlags(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN, 
				WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
		window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); //�׵θ��� ��ֱ�
		dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); //����ǥ���� ��ֱ�


	}
	
	public void dismiss(){
		dialog.dismiss();
	}
	
	public abstract void showDialog();

	
	class MyDialog extends Dialog{

		public MyDialog(Activity activity) {
			super(activity);
			// TODO Auto-generated constructor stub
		}

		@Override
		public void onBackPressed() {
			// TODO Auto-generated method stub
			super.onBackPressed();
		}
		
		
		
	}

}
